<script setup>
	import { ref } from 'vue';


	const { payMoney } = defineProps(['payMoney'])

</script>

<template>
	<view class="body">
		<view class="pay-result">
			<view class="pay-img">

				<uni-icons custom-prefix="iconfont" type="icon-zhifuchenggong" color="#fefefe" size="50"></uni-icons>


				<text class="pay-text">
					支付成功
				</text>
			</view>

			<view class="pay-info">
				实付 ¥{{payMoney}}
			</view>

			<view class="control-button">
				<navigator class="button" open-type="switchTab" url="/pages/index/index">
					返回首页
				</navigator>
				<navigator class="button" url="/pages/orders/orders?index=2" open-type="redirect">
					查看订单
				</navigator>
			</view>
		</view>

		<!-- <view class="recommended">
			<view class="title">
				秒杀商品
			</view>

			<view class="cate-two-box">

				<view class="goods-card-box" v-for="(item,index) in 10" :key="index" @click="goodsDetail(item)">

					<view class="goods-item-img">
						<image src="../../static/images/demo-pic.png" mode="aspectFit"></image>
					</view>
					<view class="goods-item-title">
						商品名商品名商品名商品名商品名商品名商品名商品名商品名
					</view>
					<view class="goods-item-buy">
						<view class="goods-item-price">
							￥9.99
						</view>
						<view class="goods-item-price-old">
							<text class="price">
								￥99.99
							</text> <text class="sold">
								已售999
							</text>
						</view>

						<view class="add-to-cart" @click.stop="addTocart(item)">
							<view class="icon">
								<uni-icons custom-prefix="iconfont" type="icon-gouwuche" color="#fefefe"
									size="16"></uni-icons>
							</view>

						</view>
					</view>

				</view>

			</view>

		</view> -->
	</view>
</template>


<style lang="scss">
	@import "/uni.scss";

	.pay-result {
		padding: 50rpx;
		height: 300rpx;
		background: generate-gradient-bottom(#3bae43, #fff);
		color: #fefefe;


		.pay-img {
			display: flex;
			align-items: center;
			width: fit-content;
			margin: 0 auto;

			.pay-text {
				font-size: 45rpx;
				margin-left: 34rpx;
			}
		}


		.pay-info {
			padding: 30rpx 0 70rpx;
			font-size: 36rpx;
			text-align: center;
		}

		.control-button {
			display: flex;
			justify-content: center;

			.button {
				margin: 0 20rpx;
				padding: 18rpx 23rpx;
				width: 220rpx;
				height: 50rpx;
				text-align: center;
				border: #3bae43 3rpx solid;
				font-size: 35rpx;
				color: #3bae43;
				border-radius: 50rpx;
			}
		}

	}

	.recommended {
		background-color: #f5f5f5;
		padding: 30rpx 20rpx 40rpx;

		.title {
			font-size: 30rpx;
			color: #101010;
		}

		.cate-two-box {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.goods-card-box {
				margin: 15rpx auto 0;
				width: 320rpx;
				background-color: #fff;
				border-radius: 15rpx;
				overflow: hidden;

				.goods-item-img {
					display: flex;
					justify-content: center;
					height: 285rpx;
					width: 285rpx;
					overflow: hidden;
					margin: 0 auto;

					image {
						height: 100%;
						width: 100%;
					}
				}

				.goods-item-title {
					width: 80%;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
					margin-top: 15rpx;
					color: #101010;
					font-size: 29rpx;
					line-height: 35rpx;
					padding: 0 8rpx;
				}

				.goods-item-buy {
					position: relative;
					padding: 0 8rpx 10rpx;

					.goods-item-price {
						font-size: 32rpx;
						color: darken($color: $custom-theme-red, $amount: 15%);
						line-height: 40rpx;
					}

					.goods-item-price-old {
						font-size: 18rpx;

						.price {
							text-decoration: line-through;
							color: #c0b8b5;
						}

						.sold {
							color: lighten($color: $custom-theme-red, $amount: 5%);
							font-size: 23rpx;
						}
					}

					.add-to-cart {
						position: absolute;
						bottom: 15rpx;
						right: 18rpx;
						display: flex;
						flex-direction: column;
						align-items: center;

						.icon {
							margin-bottom: 5rpx;
							background-color: $custom-theme-red;
							width: 50rpx;
							height: 50rpx;
							border-radius: 25rpx;
							text-align: center;
							line-height: 55rpx;
						}
					}
				}
			}
		}
	}
</style>